from celery import Celery

# 创建Celery对象
# 参数main 设置脚本名
import os
if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'mall.settings'

app=Celery('celery_tasks')

app.config_from_object('celery_task.config')

app.autodiscover_tasks(['celery_tasks.sms'])

app.autodiscover_tasks(['celey_task.sms','celery_task.mail'])